package com.zlx.guguanjia.mapper;


import com.zlx.guguanjia.entity.Transfer;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;

@org.apache.ibatis.annotations.Mapper
public interface TransferMapper extends Mapper<Transfer> {
    /***
     * @Author 周罗校
     * @Description 外联，拿运输人名，电话号码
     * @Param [id]
     * @return java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
     * @Date 2020.10.28 17:20:55
     **/
    @Select("SELECT " +
            " tr.*, " +
            " su.NAME transfer_user_name, " +
            " su.phone transfer_user_phone  " +
            "FROM " +
            " transfer tr, " +
            " sys_user su  " +
            "WHERE " +
            " tr.work_order_id = #{id}  " +
            " AND tr.del_flag = 0  " +
            " AND tr.oprate_user_id = su.id order by tr.create_date desc")
    List<Map<String,Object>> selectById(long id);
}